package com.cxx.purchasecharge.core.model.persistence;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;

import com.cxx.purchasecharge.core.model.BaseModel;

/**
 * 货物序列号
 */
@Entity
@Table (name = "pc_goods_serial")
public class GoodsSerialNumber extends BaseModel
{
    private static final long serialVersionUID = 1L;

    private long id;
    private String serialNumber;
    private long goods;
    
    public GoodsSerialNumber () {}

    @Id
    @GeneratedValue (strategy = GenerationType.AUTO)
    public long getId ()
    {
        return id;
    }

    public void setId (long id)
    {
        this.id = id;
    }

    @Column (nullable = false, unique = true)
    public String getSerialNumber ()
    {
        return serialNumber;
    }

    public void setSerialNumber (String serialNumber)
    {
        this.serialNumber = serialNumber;
    }

    @Column (nullable = false)
    public long getGoods ()
    {
        return goods;
    }

    public void setGoods (long goods)
    {
        this.goods = goods;
    }
}
